<template>
	<view class="p-3">
		<view class="h3 font-weight-bold mb-3">{{detail.name}}</view>
		<view class="text-light-muted font" >{{detail.createtime*1000 | fromData}}</view>
		<view class="mt-3 font" v-html="detail.content || detail.info"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: {}
			}
		},
		filters:{
			fromData(date) {
				var date = new Date(date);
				  var YY = date.getFullYear() + '-';
				  var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
				  var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
				  var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
				  var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
				  var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
				  return YY + MM + DD +" "+hh + mm + ss;
			}
		},
		onLoad(e) {
			this.detail = JSON.parse(e.detail)
		}
	}
</script>

<style>

</style>
